<?php
	// constants

//	define("DB_ENGINE_CLASS",'db_mysql');
	define("DB_ENGINE_CLASS",'db_odbc_mssql');
//	define("DB_ENGINE_CLASS",'db_adodb_mssql');

	define("ROOT",			realpath(dirname(__FILE__).'/../').'/' ); // root directory
	define("INCLUDES",	ROOT.'includes/' ); // includes directory
	define("CLASSES",		INCLUDES.'classes/'); // classes directory
	define("FILES",		ROOT.'files/'); // directorio de clases
	define("URL",			'http://localhost/gazpromug/');	// home url
	define("TEMPLATES",	ROOT.'themes/'); // templates dir
	define("TEMPLTES_URL", URL.'themes/');

	define("SITE_NAME", 'ГазПром ЮГ');	// Site name
	define("SITE_EMAIL", 'gazprom@gaz.gaz');	// site email

	define("DATE_FORMAT","%d/%m/%Y");
	define("TIME_FORMAT","%H:%i");

	require_once(INCLUDES.'functions.php');
	require_once(CLASSES.DB_ENGINE_CLASS.'.php');
	//DB connection

	$db = new db("(local)","gazpromug","gazpromug","pubs");

	$notice = array();
	if (isset($_GET['q'])){
		$get = explode('/',$_GET['q']);
		$_page = array_shift($get);
		$_params = $get;
	}else{
		$get = array();
		$_page = 'main';
		$_params = array();
	}


/*
 	if (empty($_SESSION['page']) || trim($_GET['q'],' \t\n/')!=$_SESSION['page']){
		$_SESSION['old_page'] = $_SESSION['page'];
		$_SESSION['page'] = trim($_GET['q'],' \t\n/');
	}
*/
?>
